40278d99BLsfUv3qxv0I8C1sClZ0ow tools/libxc/xc_elf.h
403e0977Bjsm_e82pwvl9VvaJxh8Gg tools/libxc/xc_evtchn.c
4227c129ZKjJPNYooHVzBCyinf7Y6Q tools/libxc/xc_gnttab.c
-40e03333Eegw8czSWvHsbKxrRZJjRA tools/libxc/xc_io.c
-40e03333vrWGbLAhyJjXlqCHaJt7eA tools/libxc/xc_io.h
3fbba6dbNCU7U6nsMYiXzKkp3ztaJg tools/libxc/xc_linux_build.c
3fbba6dbl267zZOAVHYLOdLCdhcZMw tools/libxc/xc_linux_restore.c
3fbba6db7li3FJiABYtCmuGxOJxEGw tools/libxc/xc_linux_save.c
SRCS += xc_domain.c
SRCS += xc_evtchn.c
SRCS += xc_gnttab.c
-SRCS += xc_io.c
SRCS += xc_linux_build.c
SRCS += xc_plan9_build.c
SRCS += xc_linux_restore.c
+++ /dev/null
-#include "xc_io.h"
-#include <sys/time.h>
-
-void xcio_timestamp(XcIOContext *ctxt, const char *msg){
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- if (msg[0] != '\b' && msg[0] != '\r')
- fprintf(stdout, "[%08ld.%06ld] ", tv.tv_sec, tv.tv_usec);
-}
-
-void xcio_error(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- va_start(args, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
- IOStream_vprint(ctxt->info, msg, args);
- IOStream_print(ctxt->info, "\n");
- va_end(args);
-}
-
-void xcio_info(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- if(0 && !(ctxt->flags & XCFLAGS_VERBOSE)) return;
- va_start(args, msg);
- xcio_timestamp(ctxt, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n");
- IOStream_vprint(ctxt->info, msg, args);
- fflush(stdout);
- va_end(args);
-}
-
-void xcio_debug(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- if(0 && !(ctxt->flags & XCFLAGS_DEBUG)) return;
- va_start(args, msg);
- xcio_timestamp(ctxt, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n");
- IOStream_vprint(ctxt->info, msg, args);
- va_end(args);
-}
+++ /dev/null
-#ifndef __XC_XC_IO_H__
-#define __XC_XC_IO_H__
-
-#include <errno.h>
-#include "xc_private.h"
-#include "iostream.h"
-
-typedef struct XcIOContext {
- u32 domain;
- unsigned flags;
- int resource;
- IOStream *io;
- IOStream *info;
- IOStream *err;
- char *vmconfig;
- int vmconfig_n;
- int (*suspend)(void *data, u32 domain);
- int (*configure)(void *data, u32 domain, char *vmconfig, int vmconfig_n);
- void *data;
-} XcIOContext;
-
-static inline int xcio_suspend_domain(XcIOContext *ctxt){
- int err = 0;
-
- if(ctxt->suspend){
- err = ctxt->suspend(ctxt->data, ctxt->domain);
- } else {
- err = -EINVAL;
- }
- return err;
-}
-
-static inline int xcio_configure_domain(XcIOContext *ctxt){
- int err = 0;
-
- if(ctxt->configure){
- err = ctxt->configure(ctxt->data, ctxt->domain, ctxt->vmconfig, ctxt->vmconfig_n);
- } else {
- err = -EINVAL;
- }
- return err;
-}
-
-static inline int xcio_read(XcIOContext *ctxt, void *buf, int n){
- int rc;
-
- rc = IOStream_read(ctxt->io, buf, n);
- return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_write(XcIOContext *ctxt, void *buf, int n){
- int rc;
-
- rc = IOStream_write(ctxt->io, buf, n);
- return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_flush(XcIOContext *ctxt){
- return IOStream_flush(ctxt->io);
-}
-
-extern void xcio_error(XcIOContext *ctxt, const char *msg, ...);
-extern void xcio_info(XcIOContext *ctxt, const char *msg, ...);
-
-#define xcio_perror(_ctxt, _msg...) \
-xcio_error(_ctxt, "(errno %d %s)" _msg, errno, strerror(errno), ## _msg)
-
-#endif /* ! __XC_XC_IO_H__ */
-
-
-
* xc_vmx_build.c
*/
+#include <stddef.h>
#include "xc_private.h"
#define ELFSIZE 32
#include "xc_elf.h"